package com.knowvoyage.knowvoyageserver.mapper;

import com.knowvoyage.knowvoyageserver.pojo.entity.Message;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MessageMapper {
    void insert(Message message);
    void deleteById(Long messageId);
    void update(Message message);
    Message selectById(Long messageId);
    List<Message> selectByDialogId(Long dialogId);
    Message selectLastByDialogId(Long dialogId);
    int countByDialogId(Long dialogId);

    List<Message> selectByMessageIds(List<Long> messageIds);
}
